package com.wanmait.schedule.service.impl;

import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.wanmait.schedule.entity.Schedule;
import com.wanmait.schedule.mapper.ScheduleMapper;
import com.wanmait.schedule.mapper.StudentMapper;
import com.wanmait.schedule.service.ScheduleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.xml.crypto.Data;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 课程表 服务实现类
 * </p>
 *
 * @author wanmait
 * @since 2022-12-05
 */
@Service
public class ScheduleServiceImpl extends ServiceImpl<ScheduleMapper, Schedule> implements ScheduleService {

    @Resource
    private ScheduleMapper scheduleMapper;

    @Override
    public List<Schedule> findAll() {
        return scheduleMapper.findSchedule();
    }

    @Override
    public List<Schedule> findByClassesAndTime(Integer classesId, String beginTime, String endTime) {
        return scheduleMapper.findByClassesAndTime(classesId, beginTime, endTime);
    }

    @Override
    public List<Schedule> findByClassesAndTimeWeb(Integer classesId, String beginTime, String endTime) {
        return scheduleMapper.findByClassesAndTimeWeb(classesId, beginTime, endTime);
    }

    @Override
    public void delete(String beginTime, String endTime) {
        scheduleMapper.delete(beginTime,endTime);
    }

    @Override
    public int findNum(Integer courseId, Integer classesId, Date date) {
        return scheduleMapper.findnumber(courseId,classesId,date);
    }

    @Override
    public void publish(String beginTime, String endTime) {
        scheduleMapper.publish(beginTime,endTime);
    }

    @Override
    public List<Schedule> checkPublish(String time) {
        return scheduleMapper.checkPublish(time);
    }

    @Override
    public List<Schedule> checkPublish(String beginTime, String endTime) {
        return scheduleMapper.checkThisPublish(beginTime, endTime);
    }

    @Override
    public List<Schedule> find(String beginTime, String endTime) {
        return scheduleMapper.find(beginTime, endTime);
    }

}
